{include file=member.header.html}
<style>
    .red-point{
        position: relative;
    }

    .red-point::before{
        content: " ";
        border: 3px solid red;/*设置红色*/
        border-radius:3px;/*设置圆角*/
        position: absolute;
        z-index: 1000;
        right: 0%;
        margin-right: 10px;
        margin-top: 0px;
    }
</style>
<div class="content">
    {include file=member.menu.html}
    <div id="right">
        {include file=member.curlocal.html}
        <div class="submenu">
            <ul class="tab">
                <li class="normal first">
                    <h2>
                    <a href="index.php?app=my_chatlog">
                        聊天列表
                    </a></h2>
                </li>
                <!--{foreach from=$newArr item=nn}-->
                    <!--{if $userInfo.user_id eq $nn['otherid']}-->
                        <li class="active">
                            <h2>
                            <a href="index.php?app=my_chatlog&amp;act=reply&amp;otherid={$userInfo.user_id}">{$userInfo.user_name}</a>
                            </h2>
                        </li>
                        <!--{else}-->
                        <li class="normal" <!--{if $nn.is_read eq 1}-->style="red-point"<!--{/if}-->  >
                            <h2>
                                <a href="index.php?app=my_chatlog&amp;act=reply&amp;otherid={$nn.otherid}">{$nn.user_name.user_name}</a>
                            </h2>
                        </li>
                    <!--{/if}-->
                <!--{/foreach}-->

            </ul>
        </div>
        <div class="wrap">
            <div class="public">
                <div class="message message_line">
                    <div style="height: 400px; overflow-y: auto"; class="show-chat-content">
                    <!--{foreach from=$chat_list item=cl}-->
                    <!--{if $cl.user_id eq $cl.receiverid}-->
                        <div class="message_con">
                            <div class="seller">
                                <h3><span>{$cl.receive_phone|escape}</span><br />{$cl.sendtime|date:Y-m-d H:i}</h3>
                                <div style="width: 50%; float: right">
                                    <h4>{$cl.sendcontent}</h4>
                                </div>
                            </div>
                            <div class="txt">{$cl.content|modifier:short_msg_filter}</div>
                        </div>
                        <!--{else}-->
                        <div class="message_con">
                            <div class="seller">
                                <!--<p><img src="{$cl.portrait|escape}" width="50" height="50" alt="" /></p>-->
                                <h3><span style="color: red">客服</span>
                                <!--<h3><span>{$cl.receive_phone|escape}</span>-->
                                    <br /><span style="color: red">{$cl.sendtime|date:Y-m-d H:i}</span>
                                </h3>
                                <div style="width: 50%; float: right">
                                <h4><span style="color: red">{$cl.sendcontent}</span></h4>
                                </div>
                            </div>
                            <div class="txt">{$cl.content|modifier:short_msg_filter}</div>
                        </div>
                    <!--{/if}-->
                    <!--{/foreach}-->
                    </div>
                </div>
            </div>
        </div>
        <form method="post" action="index.php?app=my_chatlog&amp;act=send&amp;reveiver_id={$other_id}" target="_self">
            <h1>{$lang.reply}:</h1>
            <textarea name="description" id="description"  style="width:95%; height:80px;"></textarea>
            <div class="issuance">
                <input type="submit" id="confirm_button" class="btn" value="{$lang.confirm}" />
            </div>
        </form>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<script>
    var showContent = $(".show-chat-content");
    showContent[0].scrollTop = showContent[0].scrollHeight;

    var intDiff = parseInt(5);
    function timer(intDiff){
        window.setInterval(function(){
            var day=0,
                hour=0,
                minute=0,
                second=0;//时间默认值
            if(intDiff > 0){
                day = Math.floor(intDiff / (60 * 60 * 24));
                hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
            }else{//当时间耗尽，刷新页面
                window.location.reload();
            }
            if (minute <= 9) minute = '0' + minute;
            if (second <= 9) second = '0' + second;
            $(".timeShow").html('本页数据还剩下<font>'+minute+'分'+second+'</font>秒刷新,刷新间隔时间: 10 分钟');
            intDiff--;
        }, 1000);
    }
    // $(function(){
    //     timer(intDiff);
    // });
</script>
{include file=footer.html}
